import { http } from '@/utils/http';
import type { LoginVO } from '@/types/user';

type LoginWxMinParams = {
    code: string;
    encryptedData?: string;
    iv?: string;
};
/**
 * 小程序登录
 * @param data 请求参数
 */
export const postLoginWxMinAPI = (data: LoginWxMinParams) => {
    return http<LoginVO>({
        method: 'POST',
        url: '/auth/wxLogin',
        data
    });
};
